<ul class="nav nav-list">
    <li class="active">
    <a href="{% url "index" %}">
        <i class="menu-icon fa fa-tachometer"></i>
        <span class="menu-text"> Dashboard </span>
    </a>

    <b class="arrow"></b>
    </li>


    {% for var in rows  %}

    <li class="">
    <a href="#" class="dropdown-toggle">
        <i class="menu-icon fa fa-desktop"></i>
        <span class="menu-text">
            {{ var.text }}
        </span>

        <b class="arrow fa fa-angle-down"></b>
    </a>

    <b class="arrow"></b>


    <ul class="submenu">
        {% for urlvar in  urlrows %}
                 {% ifequal urlvar.parent_id  var.id   %}
 <li class="">
 <a href="{% url urlvar.url_name %}">
     <i class="menu-icon fa fa-caret-right"></i>
     {{ urlvar.text }}
 </a>

 <b class="arrow"></b>
 </li>
 {% endifequal %}
 {% endfor %}
 </ul>



 </li>
 {% endfor %}
</ul><!-- /.nav-list -->



